﻿
@{
    ViewBag.Title = "TrainDetail";
    ViewBag.First = "车辆管理";
    ViewBag.Second = "驾驶员培训记录详情";
    Layout = "~/Views/Shared/_BaseLayout.cshtml";
}
<script type="text/javascript">
    $(document).ready(function (e) {
        $(".select2").uedSelect({
            width: 120
        });
        loadData();
    });
    //数据加载
    function loadData() {
        var url = "@Url.Action("GetTrainDetail")";
        var load = loadTip("数据加载中，请稍后", 16, 0);
        $.get(url, { id: '@ViewData["id"]' }, function (data) {
            sureDriver(data);
        });
    }
    //司机
    function sureDriver(list) {
        var table = document.getElementById("listData");
        for (var i = 0; i < list.length; i++) {
            var row = table.insertRow(table.rows.length);
            var index = row.insertCell(0);
            index.innerHTML = (i + 1).toString();
            var name = row.insertCell(1);
            name.innerHTML = list[i].Name;
            var sc = row.insertCell(2);
            sc.innerHTML = list[i].Score;
        }
        layer.closeAll();
    }
    function back() {
        window.location.href = "@Url.Action("index")";
    }
</script>
<div class="formbody">
    <div class="formtitle"><span>驾驶员培训记录详情</span></div>
    <div class="tools">
        <ul class="seachform">
            <li>
                <label>培训类型</label>
                <div class="vocation">
                    <input type="text" value="@ViewData["bTypeName"]" readonly="readonly" class="scinput" />
                </div>
            </li>
            <li>
                <label>培训时间</label>
                <input type="text" id="txtTime" value="@ViewData["time"]" readonly="readonly" class="scinput" />
            </li>
            <li>
                <label>&nbsp;</label>
                <input type="button" class="scbtn" onclick="back();;" value="返 回" />
            </li>
        </ul>
    </div>
    <table class="tablelist">
        <thead>
            <tr>
                <th width="60">编号</th>
                <th>姓名</th>
                <th>得分</th>
            </tr>
        </thead>
        <tbody id="listData"></tbody>
    </table>
</div>

